﻿<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
					   xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
					   x:Class="HowToBBQXAMLSample.Views.DetailsPage"
             xmlns:local="clr-namespace:HowToBBQXAMLSample;assembly=HowToBBQXAMLSample"
             Title="{Binding Name}">
    <ContentPage.Resources>
    <ResourceDictionary>
      <OnPlatform x:Key="labelFont" x:TypeArguments="Font">
        <OnPlatform.iOS>0</OnPlatform.iOS>
        <OnPlatform.Android>0</OnPlatform.Android>
        <OnPlatform.WinPhone>32</OnPlatform.WinPhone>
      </OnPlatform>
    </ResourceDictionary>
  </ContentPage.Resources>
  <Grid Padding="20,0,0,0">
    <Grid.ColumnDefinitions>
      <ColumnDefinition  Width="Auto" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="*"/>
      <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <ScrollView  Grid.Row="1" Grid.Column="0">
      <StackLayout VerticalOptions="FillAndExpand">
          <Label Text="{Binding PrepTime, StringFormat='PrepTime: {0}'}"/>
          <Label Text="{Binding TotalTime,StringFormat='TotalTime: {0}'}"/>
          <Label Text="{Binding Serves,StringFormat='Serves: {0}'}"/>
          <Label Text="{Binding Ingredients}"/>
          <Label Text="{Binding Directions}"/>
      </StackLayout>
    </ScrollView>
      <StackLayout Grid.Row="0" Grid.Column="0" Orientation="Vertical">
      <Label Text="{Binding Name}" Font="{StaticResource labelFont}" />
      <Image Source="{Binding ImageSource}"  VerticalOptions="FillAndExpand" Aspect="AspectFit"/>
    </StackLayout>
  </Grid>    
</ContentPage>